package com.cctc.framework.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import com.cctc.framework.bean.BaseObj;

@Entity
@Table(name = "CCTCT_TREES")
public class TreeObject extends BaseObj
{

    private static final long serialVersionUID = 1L;
    
    @Id
    @JsonSerialize
    @JsonDeserialize
    @JsonProperty("id")
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;
    
    @JsonSerialize
    @JsonDeserialize
    @JsonProperty("text")
    @Column(name = "TEXT",length = 20)
    private String text;
    
    @JsonSerialize
    @JsonDeserialize
    @JsonProperty("state")
    @Column(name = "STATE",length = 20)
    private String state;
    
    @Column(name = "PARENT_ID")
    private int  parentId;
    
    @JsonSerialize
    @JsonDeserialize
    @JsonProperty("iconCls")
    @Column(name = "ICON_CLS")
    private String iconCls;
    
    @Column(name = "SORT_NUM")
    private int sortNum;
    
    @Column(name = "TREE_NAME")
    private String treeName;

    public int getId()
    {
        return id;
    }

    public void setId(int id)
    {
        this.id = id;
    }

    public String getText()
    {
        return text;
    }

    public void setText(String text)
    {
        this.text = text;
    }

    public String getState()
    {
        return state;
    }

    public void setState(String state)
    {
        this.state = state;
    }

    public int getParentId()
    {
        return parentId;
    }

    public void setParentId(int parentId)
    {
        this.parentId = parentId;
    }

    public String getIconCls()
    {
        return iconCls;
    }

    public void setIconCls(String iconCls)
    {
        this.iconCls = iconCls;
    }

    public int getSortNum()
    {
        return sortNum;
    }

    public void setSortNum(int sortNum)
    {
        this.sortNum = sortNum;
    }

    public String getTreeName()
    {
        return treeName;
    }

    public void setTreeName(String treeName)
    {
        this.treeName = treeName;
    }
    
}
